package com.forum.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

/**
 * 文章板块信息
 * @TableName forum_board
 */
@TableName(value ="forum_board")
public class ForumBoard implements Serializable {
    /**
     * 板块ID
     */
    @TableId(type = IdType.AUTO)
    private Integer boardId;

    /**
     * 父级板块ID
     */
    private Integer pBoardId;

    /**
     * 板块名
     */
    private String boardName;

    /**
     * 描述
     */
    private String boardDesc;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 板块ID
     */
    public Integer getBoardId() {
        return boardId;
    }

    /**
     * 板块ID
     */
    public void setBoardId(Integer boardId) {
        this.boardId = boardId;
    }

    /**
     * 父级板块ID
     */
    public Integer getpBoardId() {
        return pBoardId;
    }

    /**
     * 父级板块ID
     */
    public void setpBoardId(Integer pBoardId) {
        this.pBoardId = pBoardId;
    }

    /**
     * 板块名
     */
    public String getBoardName() {
        return boardName;
    }

    /**
     * 板块名
     */
    public void setBoardName(String boardName) {
        this.boardName = boardName;
    }

    /**
     * 描述
     */
    public String getBoardDesc() {
        return boardDesc;
    }

    /**
     * 描述
     */
    public void setBoardDesc(String boardDesc) {
        this.boardDesc = boardDesc;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ForumBoard other = (ForumBoard) that;
        return (this.getBoardId() == null ? other.getBoardId() == null : this.getBoardId().equals(other.getBoardId()))
            && (this.getpBoardId() == null ? other.getpBoardId() == null : this.getpBoardId().equals(other.getpBoardId()))
            && (this.getBoardName() == null ? other.getBoardName() == null : this.getBoardName().equals(other.getBoardName()))
            && (this.getBoardDesc() == null ? other.getBoardDesc() == null : this.getBoardDesc().equals(other.getBoardDesc()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getBoardId() == null) ? 0 : getBoardId().hashCode());
        result = prime * result + ((getpBoardId() == null) ? 0 : getpBoardId().hashCode());
        result = prime * result + ((getBoardName() == null) ? 0 : getBoardName().hashCode());
        result = prime * result + ((getBoardDesc() == null) ? 0 : getBoardDesc().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", boardId=").append(boardId);
        sb.append(", pBoardId=").append(pBoardId);
        sb.append(", boardName=").append(boardName);
        sb.append(", boardDesc=").append(boardDesc);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}